Repetier-Firmware  1.0.0
Configuration.h
Go to the documentation of this file.
1 /*
2  This file is part of Repetier-Firmware.
3 
4  Repetier-Firmware is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  Repetier-Firmware is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with Repetier-Firmware. If not, see <http://www.gnu.org/licenses/>.
16 
17 */
18 
19 #ifndef CONFIGURATION_H
20 #define CONFIGURATION_H
21 
22 /* Some words on units:
23 
24 From 0.80 onwards the units used are unified for easier configuration, watch out when transferring from older configs!
25 
26 Speed is in mm/s
27 Acceleration in mm/s^2
28 Temperature is in degrees Celsius
29 
30 
31 ##########################################################################################
32 ## IMPORTANT ##
33 ##########################################################################################
34 
35 For easy configuration, the default settings enable parameter storage in EEPROM.
36 This means, after the first upload many variables can only be changed using the special
37 M commands as described in the documentation. Changing these values in the configuration.h
38 file has no effect. Parameters overridden by EEPROM settings are calibration values, extruder
39 values except thermistor tables and some other parameter likely to change during usage
40 like advance steps or ops mode.
41 To override EEPROM settings with config settings, set EEPROM_MODE 0
42 
43 */
44 
45 
46 // BASIC SETTINGS: select your board type, thermistor type, axis scaling, and endstop configuration
47 
49 #define NUM_EXTRUDER 1
50 
52 #define MIXING_EXTRUDER 0
53 
55 // Gen3 PLUS for RepRap Motherboard V1.2 = 21
56 // MEGA/RAMPS up to 1.2 = 3
57 // RAMPS 1.3/RAMPS 1.4 = 33
58 // Azteeg X3 = 34
59 // Azteeg X3 Pro = 35
60 // MPX3 (mainly RAMPS compatible) = 38
61 // Ultimaker Shield 1.5.7 = 37
62 // Gen6 = 5
63 // Gen6 deluxe = 51
64 // Sanguinololu up to 1.1 = 6
65 // Sanguinololu 1.2 and above = 62
66 // 3Drag/Velleman K8200 = 66 (experimental)
67 // Open Motion Controller = 91
68 // Melzi board = 63 // Define REPRAPPRO_HUXLEY if you have one for correct HEATER_1_PIN assignment!
69 // Azteeg X1 = 65
70 // 3Drag/Velleman K8200 (experimental) = 66
71 // Gen7 1.1 till 1.3.x = 7
72 // Gen7 1.4.1 and later = 71
73 // Sethi 3D_1 = 72
74 // Teensylu (at90usb) = 8 // requires Teensyduino
75 // Printrboard (at90usb) = 9 // requires Teensyduino
76 // Printrboard Ref. F or newer= 92 // requires Teensyduino
77 // Foltyn 3D Master = 12
78 // MegaTronics 1.0 = 70
79 // Megatronics 2.0 = 701
80 // Megatronics 3.0 = 703 // Thermistors predefined not thermocouples
81 // Minitronics 1.0 = 702
82 // RUMBA = 80 // Get it from reprapdiscount
83 // FELIXprinters = 101
84 // Rambo = 301
85 // PiBot for Repetier V1.0-1.3= 314
86 // PiBot for Repetier V1.4 = 315
87 // PiBot Controller V2.0 = 316
88 // Sanguish Beta = 501
89 // Unique One rev. A = 88
90 // SAV MK1 = 89
91 // MJRice Pica Rev B = 183
92 // MJRice Pica Rev C = 184
93 // Zonestar ZRIB 2.1 = 39
94 // User layout defined in userpins.h = 999
95 
96 #define MOTHERBOARD 33
97 
98 #include "pins.h"
99 
100 // Override pin definitions from pins.h
101 //#define FAN_PIN 4 // Extruder 2 uses the default fan output, so move to an other pin
102 //#define EXTERNALSERIAL use Arduino serial library instead of build in. Requires more ram, has only 63 byte input buffer.
103 
104 /*
105 We can connect BlueTooth to serial converter module directly to boards based on AtMega2560 or AtMega1280 and some boards based on AtMega2561, AtMega1281 or AtMega1284p
106 - On Melzi boards connect BT to TX1 and RX1 pins, then set BLUETOOTH_SERIAL to 1
107 - On RUMBA boards connect BT to pin 11 and 12 of X3 connector, then set BLUETOOTH_SERIAL to 3
108 - On RAMBO boards connect BT to pins 5,6 or 7,8 or 9,10 on Serial connector, then accordingly set BLUETOOTH_SERIAL to 1,2 or 3
109 - On RAMPS we must remap Y_ENDSTOPS pins or Z_ENDSTOPZ pins or LCD_ENABLE and LCD_RS pins to another pins, and connect BT to:
110  a) signals of Y_MIN, Y_MAX, then set BLUETOOTH_SERIAL to 3 (RX from BT to Y_MIN, TX from BT to Y_MAX)
111  b) signals of Z_MIN, Z_MAX, then set BLUETOOTH_SERIAL to 1 (RX from BT to Z_MIN, TX from BT to Z_MAX)
112  c) pin 17 and 18 of AUX4 connector, then set BLUETOOTH_SERIAL to 2 (RX from BT to AUX4 p18, TX from BT to AUX4 p17)
113  Comment out or set the BLUETOOTH_SERIAL to 0 or -1 to disable this feature.
114 */
115 #define BLUETOOTH_SERIAL 1 // Port number (1..3) - For RUMBA use 3
116 #define BLUETOOTH_BAUD 115200 // communication speed
117 
118 // Uncomment the following line if you are using Arduino compatible firmware made for Arduino version earlier then 1.0
119 // If it is incompatible you will get compiler errors about write functions not being compatible!
120 //#define COMPAT_PRE1
121 
122 /* Define the type of axis movements needed for your printer. The typical case
123 is a full cartesian system where x, y and z moves are handled by separate motors.
124 
125 0 = full cartesian system, xyz have separate motors.
126 1 = z axis + xy H-gantry (x_motor = x+y, y_motor = x-y)
127 2 = z axis + xy H-gantry (x_motor = x+y, y_motor = y-x)
128 3 = Delta printers (Rostock, Kossel, RostockMax, Cerberus, etc)
129 4 = Tuga printer (Scott-Russell mechanism)
130 5 = Bipod system (not implemented)
131 8 = y axis + xz H-gantry (x_motor = x+z, z_motor = x-z)
132 9 = y axis + xz H-gantry (x_motor = x+z, z_motor = z-x)
133 Cases 1, 2, 8 and 9 cover all needed xy and xz H gantry systems. If you get results mirrored etc. you can swap motor connections for x and y.
134 If a motor turns in the wrong direction change INVERT_X_DIR or INVERT_Y_DIR.
135 */
136 #define DRIVE_SYSTEM 0
137 /*
138  Normal core xy implementation needs 2 virtual steps for a motor step to guarantee
139  that every tiny move gets maximum one step regardless of direction. This can cost
140  some speed, so alternatively you can activate the FAST_COREXYZ by uncommenting
141  the define. This solves the core movements as nonlinear movements like done for
142  deltas but without the complicated transformations. Since transformations are still
143  linear you can reduce delta computations per second to 10 and also use 10
144  subsegments instead of 20 to reduce memory usage.
145 */
146 //#define FAST_COREXYZ
147 
148 /* You can write some GCODE to be executed on startup. Use this e.g. to set some
149 pins. Separate multiple GCODEs with \n
150 */
151 //#define STARTUP_GCODE ""
152 
153 // ##########################################################################################
154 // ## Calibration ##
155 // ##########################################################################################
156 
159 #if DRIVE_SYSTEM == DELTA
160  // ***************************************************
161  // *** These parameter are only for Delta printers ***
162  // ***************************************************
163 
165 #define DELTA_DRIVE_TYPE 0
166 
167 #if DELTA_DRIVE_TYPE == 0
168 
169 #define BELT_PITCH 2
170 
171 #define PULLEY_TEETH 20
172 #define PULLEY_CIRCUMFERENCE (BELT_PITCH * PULLEY_TEETH)
173 #elif DELTA_DRIVE_TYPE == 1
174 
175 #define PULLEY_DIAMETER 10
176 #define PULLEY_CIRCUMFERENCE (PULLEY_DIAMETER * 3.1415927)
177 #endif
178 
180 #define STEPS_PER_ROTATION 200
181 
183 #define MICRO_STEPS 16
184 
185 // Calculations
186 #define AXIS_STEPS_PER_MM ((float)(MICRO_STEPS * STEPS_PER_ROTATION) / PULLEY_CIRCUMFERENCE)
187 #define XAXIS_STEPS_PER_MM AXIS_STEPS_PER_MM
188 #define YAXIS_STEPS_PER_MM AXIS_STEPS_PER_MM
189 #define ZAXIS_STEPS_PER_MM AXIS_STEPS_PER_MM
190 #else
191 // *******************************************************
192 // *** These parameter are for all other printer types ***
193 // *******************************************************
194 
199 #define XAXIS_STEPS_PER_MM 98.425196
200 
203 #define YAXIS_STEPS_PER_MM 98.425196
204 
205 #define ZAXIS_STEPS_PER_MM 2560
206 #endif
207 
208 // ##########################################################################################
209 // ## Extruder configuration ##
210 // ##########################################################################################
211 
212 // You can use either PWM (pulse width modulation) or PDM (pulse density modulation) for
213 // extruders or coolers. PDM will give more signal changes per second, so on average it gives
214 // the cleaner signal. The only advantage of PWM is giving signals at a fixed rate and never more
215 // then PWM.
216 #define PDM_FOR_EXTRUDER 1
217 #define PDM_FOR_COOLER 1
218 
219 // The firmware checks if the heater and sensor got decoupled, which is dangerous. Since it will never reach target
220 // temperature, the heater will stay on for every which can burn your printer or house.
221 // As an additional barrier to your smoke detectors (I hope you have one above your printer) we now
222 // do some more checks to detect if something got wrong.
223 
224 // If the temp. is on hold target, it may not sway more then this degrees celsius, or we mark
225 // sensor as defect.
226 #define DECOUPLING_TEST_MAX_HOLD_VARIANCE 20
227 // Minimum temp. rise we expect after the set duration of full heating is over.
228 // Always keep a good safety margin to get no false positives. If your period is e.g. 10 seconds
229 // because at startup you already need 7 seconds until heater starts to rise temp. for sensor
230 // then you have 3 seconds of increased heating to reach 1°C.
231 #define DECOUPLING_TEST_MIN_TEMP_RISE 1
232 // Set to 1 if you want firmware to kill print on decouple
233 #define KILL_IF_SENSOR_DEFECT 0
234 // for each extruder, fan will stay on until extruder temperature is below this value
235 #define EXTRUDER_FAN_COOL_TEMP 50
236 // Retraction for sd pause over lcd
237 #define RETRACT_ON_PAUSE 2
238 // These commands get executed after storing position and going to park position.
239 #define PAUSE_START_COMMANDS ""
240 // These commands get executed before we go to stored position.
241 #define PAUSE_END_COMMANDS ""
242 /* Set to 1 if all extruders use the same heater block. Temp. control is then always
243 controlled by settings in extruder 0 definition. */
244 #define SHARED_EXTRUDER_HEATER 0
245 /* Speed in mm/s for extruder moves fom internal commands, e.g. switching extruder. */
246 #define EXTRUDER_SWITCH_XY_SPEED 100
247 
248 // Extruder offsets in steps not mm!
249 #define EXT0_X_OFFSET 0
250 #define EXT0_Y_OFFSET 0
251 #define EXT0_Z_OFFSET 0
252 // for skeinforge 40 and later, steps to pull the plastic 1 mm inside the extruder, not out. Overridden if EEPROM activated.
253 #define EXT0_STEPS_PER_MM 413 //385
254 // What type of sensor is used?
255 // 0 is no thermistor/temperature control
256 // 1 is 100k thermistor (Epcos B57560G0107F000 - RepRap-Fab.org and many other)
257 // 2 is 200k thermistor
258 // 3 is mendel-parts thermistor (EPCOS G550)
259 // 4 is 10k thermistor
260 // 8 is ATC Semitec 104GT-2
261 // 12 is 100k RS thermistor 198-961
262 // 13 is PT100 for E3D/Ultimaker
263 // 14 is 100K NTC 3950
264 // 15 DYZE DESIGN 500°C Thermistor
265 // 16 is B3 innovations 500°C sensor
266 // 5 is userdefined thermistor table 0
267 // 6 is userdefined thermistor table 1
268 // 7 is userdefined thermistor table 2
269 // 50 is userdefined thermistor table 0 for PTC thermistors
270 // 51 is userdefined thermistor table 0 for PTC thermistors
271 // 52 is userdefined thermistor table 0 for PTC thermistors
272 // 60 is AD8494, AD8495, AD8496 or AD8497 (5mV/degC and 1/4 the price of AD595 but only MSOT_08 package)
273 // 61 is AD8494, AD8495, AD8496 or AD8497 (5mV/degC and 1.25 Vref offset like adafruit breakout)
274 // 97 Generic thermistor table 1
275 // 98 Generic thermistor table 2
276 // 99 Generic thermistor table 3
277 // 100 is AD595
278 // 101 is MAX6675
279 // 102 is MAX31855
280 #define EXT0_TEMPSENSOR_TYPE 1
281 // Analog input pin for reading temperatures or pin enabling SS for MAX6675
282 #define EXT0_TEMPSENSOR_PIN TEMP_0_PIN
283 // Which pin enables the heater
284 #define EXT0_HEATER_PIN HEATER_0_PIN
285 #define EXT0_STEP_PIN E0_STEP_PIN
286 #define EXT0_DIR_PIN E0_DIR_PIN
287 // set to false/true for normal / inverse direction
288 #define EXT0_INVERSE true
289 #define EXT0_ENABLE_PIN E0_ENABLE_PIN
290 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
291 #define EXT0_ENABLE_ON 0
292 /* Set to 1 to mirror motor. Pins for mirrored motor are below */
293 #define EXT0_MIRROR_STEPPER 0
294 #define EXT0_STEP2_PIN E0_STEP_PIN
295 #define EXT0_DIR2_PIN E0_DIR_PIN
296 #define EXT0_INVERSE2 false
297 #define EXT0_ENABLE2_PIN E0_ENABLE_PIN
298 // The following speed settings are for skeinforge 40+ where e is the
299 // length of filament pulled inside the heater. For repsnap or older
300 // skeinforge use higher values.
301 // Overridden if EEPROM activated.
302 #define EXT0_MAX_FEEDRATE 30
303 // Feedrate from halted extruder in mm/s
304 // Overridden if EEPROM activated.
305 #define EXT0_MAX_START_FEEDRATE 10
306 // Acceleration in mm/s^2
307 // Overridden if EEPROM activated.
308 #define EXT0_MAX_ACCELERATION 4000
309 
315 #define EXT0_HEAT_MANAGER 1
316 
317 #define EXT0_WATCHPERIOD 1
318 
329 #define EXT0_PID_INTEGRAL_DRIVE_MAX 140
330 
337 #define EXT0_PID_INTEGRAL_DRIVE_MIN 60
338 
339 #define EXT0_PID_PGAIN_OR_DEAD_TIME 24
340 
342 #define EXT0_PID_I 0.88
343 
344 #define EXT0_PID_D 80
345 // maximum time the heater is can be switched on. Max = 255. Overridden if EEPROM activated.
346 #define EXT0_PID_MAX 255
347 
352 #define EXT0_ADVANCE_K 0.0f
353 #define EXT0_ADVANCE_L 0.0f
354 /* Motor steps to remove backlash for advance algorithm. These are the steps
355 needed to move the motor cog in reverse direction until it hits the driving
356 cog. Direct drive extruder need 0. */
357 #define EXT0_ADVANCE_BACKLASH_STEPS 0
358 
360 #define EXT0_WAIT_RETRACT_TEMP 150
361 
364 #define EXT0_WAIT_RETRACT_UNITS 0
365 
369 #define EXT0_SELECT_COMMANDS "M117 Extruder 1"
370 #define EXT0_DESELECT_COMMANDS ""
371 
372 #define EXT0_EXTRUDER_COOLER_PIN -1
373 
374 #define EXT0_EXTRUDER_COOLER_SPEED 255
375 
377 #define EXT0_DECOUPLE_TEST_PERIOD 18000
378 
379 #define EXT0_JAM_PIN -1
380 
381 #define EXT0_JAM_PULLUP false
382 /* Temperature when using preheat */
383 #define EXT0_PREHEAT_TEMP 190
384 // =========================== Configuration for second extruder ========================
385 #define EXT1_X_OFFSET 0
386 #define EXT1_Y_OFFSET 0
387 #define EXT1_Z_OFFSET 0
388 // for skeinforge 40 and later, steps to pull the plastic 1 mm inside the extruder, not out. Overridden if EEPROM activated.
389 #define EXT1_STEPS_PER_MM 373
390 // What type of sensor is used?
391 // 0 is no thermistor/temperature control
392 // 1 is 100k thermistor (Epcos B57560G0107F000 - RepRap-Fab.org and many other)
393 // 2 is 200k thermistor
394 // 3 is mendel-parts thermistor (EPCOS G550)
395 // 4 is 10k thermistor
396 // 5 is userdefined thermistor table 0
397 // 6 is userdefined thermistor table 1
398 // 7 is userdefined thermistor table 2
399 // 8 is ATC Semitec 104GT-2
400 // 50 is userdefined thermistor table 0 for PTC thermistors
401 // 51 is userdefined thermistor table 0 for PTC thermistors
402 // 52 is userdefined thermistor table 0 for PTC thermistors
403 // 60 is AD8494, AD8495, AD8496 or AD8497 (5mV/degC and 1/4 the price of AD595 but only MSOT_08 package)
404 // 61 is AD8494, AD8495, AD8496 or AD8497 (5mV/degC and 1.25 Vref offset like adafruit breakout)
405 // 97 Generic thermistor table 1
406 // 98 Generic thermistor table 2
407 // 99 Generic thermistor table 3
408 // 100 is AD595
409 // 101 is MAX6675
410 #define EXT1_TEMPSENSOR_TYPE 3
411 // Analog input pin for reading temperatures or pin enabling SS for MAX6675
412 #define EXT1_TEMPSENSOR_PIN TEMP_2_PIN
413 // Which pin enables the heater
414 #define EXT1_HEATER_PIN HEATER_2_PIN
415 #define EXT1_STEP_PIN E1_STEP_PIN
416 #define EXT1_DIR_PIN E1_DIR_PIN
417 // set to 0/1 for normal / inverse direction
418 #define EXT1_INVERSE false
419 #define EXT1_ENABLE_PIN E1_ENABLE_PIN
420 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
421 #define EXT1_ENABLE_ON false
422 /* Set to 1 to mirror motor. Pins for mirrored motor are below */
423 #define EXT1_MIRROR_STEPPER 0
424 #define EXT1_STEP2_PIN E0_STEP_PIN
425 #define EXT1_DIR2_PIN E0_DIR_PIN
426 #define EXT1_INVERSE2 false
427 #define EXT1_ENABLE2_PIN E0_ENABLE_PIN
428 // The following speed settings are for skeinforge 40+ where e is the
429 // length of filament pulled inside the heater. For repsnap or older
430 // skeinforge use heigher values.
431 // Overridden if EEPROM activated.
432 #define EXT1_MAX_FEEDRATE 25
433 // Feedrate from halted extruder in mm/s
434 // Overridden if EEPROM activated.
435 #define EXT1_MAX_START_FEEDRATE 12
436 // Acceleration in mm/s^2
437 // Overridden if EEPROM activated.
438 #define EXT1_MAX_ACCELERATION 10000
439 
444 #define EXT1_HEAT_MANAGER 1
445 
446 #define EXT1_WATCHPERIOD 1
447 
458 #define EXT1_PID_INTEGRAL_DRIVE_MAX 130
459 
466 #define EXT1_PID_INTEGRAL_DRIVE_MIN 60
467 
468 #define EXT1_PID_PGAIN_OR_DEAD_TIME 24
469 
471 #define EXT1_PID_I 0.88
472 
473 #define EXT1_PID_D 200
474 // maximum time the heater is can be switched on. Max = 255. Overridden if EEPROM activated.
475 #define EXT1_PID_MAX 255
476 
481 #define EXT1_ADVANCE_K 0.0f
482 #define EXT1_ADVANCE_L 0.0f
483 /* Motor steps to remove backlash for advance algorithm. These are the steps
484 needed to move the motor cog in reverse direction until it hits the driving
485 cog. Direct drive extruder need 0. */
486 #define EXT1_ADVANCE_BACKLASH_STEPS 0
487 
488 #define EXT1_WAIT_RETRACT_TEMP 150
489 #define EXT1_WAIT_RETRACT_UNITS 0
490 #define EXT1_SELECT_COMMANDS "M117 Extruder 2"
491 #define EXT1_DESELECT_COMMANDS ""
492 
493 #define EXT1_EXTRUDER_COOLER_PIN -1
494 
495 #define EXT1_EXTRUDER_COOLER_SPEED 255
496 
498 #define EXT1_DECOUPLE_TEST_PERIOD 18000
499 
500 #define EXT1_JAM_PIN -1
501 
502 #define EXT1_JAM_PULLUP false
503 #define EXT1_PREHEAT_TEMP 190
504 
507 #define RETRACT_DURING_HEATUP 1
508 
510 #define FEATURE_RETRACTION 1
511 
513 #define AUTORETRACT_ENABLED 0
514 #define RETRACTION_LENGTH 3
515 #define RETRACTION_LONG_LENGTH 13
516 #define RETRACTION_SPEED 40
517 #define RETRACTION_Z_LIFT 0
518 #define RETRACTION_UNDO_EXTRA_LENGTH 0
519 #define RETRACTION_UNDO_EXTRA_LONG_LENGTH 0
520 #define RETRACTION_UNDO_SPEED 20
521 
526 #define FILAMENTCHANGE_X_POS 0
527 #define FILAMENTCHANGE_Y_POS 0
528 #define FILAMENTCHANGE_Z_ADD 1
529 
533 #define FILAMENTCHANGE_REHOME 1
534 
537 #define FILAMENTCHANGE_SHORTRETRACT 30
538 #define FILAMENTCHANGE_LONGRETRACT 30
539 
540 /* Define how we detect jam/out of filament
541  1 = Distance between signal changes increase
542  2 = signal gets high
543  3 = signal gets low
544 
545  2 and 3 are not jam detections, but only out of filament detection by a switch
546  that changes the signal!
547 */
548 #define JAM_METHOD 1
549 // Steps normally needed for a full signal cycle.
550 #define JAM_STEPS 220
551 // Steps for reducing speed. Must be higher then JAM_STEPS
552 #define JAM_SLOWDOWN_STEPS 380
553 // New speed multiplier which gets set when slowdown is reached.
554 #define JAM_SLOWDOWN_TO 70
555 // Last fallback. If we slip this much, we want to pause.
556 #define JAM_ERROR_STEPS 430
557 
559 #define JAM_MIN_STEPS 10
560 /*
561 Determine what should be done if a jam is detected
562 0 : Nothing, just mark extruder as jammed.
563 1 : Jam/out of filament dialog and block communication.
564 2 : Message to host/server otherwise continue and mark extruder jammed
565 */
566 #define JAM_ACTION 1
567 
572 #define PID_CONTROL_RANGE 20
573 
576 #define EXTRUDE_MAXLENGTH 100
577 
578 #define SKIP_M109_IF_WITHIN 2
579 
587 #define SCALE_PID_TO_MAX 0
588 
589 
590 #define HEATER_PWM_SPEED 1 // How fast ist pwm signal 0 = 15.25Hz, 1 = 30.51Hz, 2 = 61.03Hz, 3 = 122.06Hz
591 
596 //#define TEMP_HYSTERESIS 5
597 
615 #define NUM_TEMPS_USERTHERMISTOR0 28
616 #define USER_THERMISTORTABLE0 {\
617  {1*4,864*8},{21*4,300*8},{25*4,290*8},{29*4,280*8},{33*4,270*8},{39*4,260*8},{46*4,250*8},{54*4,240*8},{64*4,230*8},{75*4,220*8},\
618  {90*4,210*8},{107*4,200*8},{128*4,190*8},{154*4,180*8},{184*4,170*8},{221*4,160*8},{265*4,150*8},{316*4,140*8},{375*4,130*8},\
619  {441*4,120*8},{513*4,110*8},{588*4,100*8},{734*4,80*8},{856*4,60*8},{938*4,40*8},{986*4,20*8},{1008*4,0*8},{1018*4,-20*8} }
620 
622 #define NUM_TEMPS_USERTHERMISTOR1 0
623 #define USER_THERMISTORTABLE1 {}
624 
625 #define NUM_TEMPS_USERTHERMISTOR2 0
626 #define USER_THERMISTORTABLE2 {}
627 
650 //#define USE_GENERIC_THERMISTORTABLE_1
651 
652 /* Some examples for different thermistors:
653 
654 EPCOS B57560G104+ : R0 = 100000 T0 = 25 Beta = 4036
655 EPCOS 100K Thermistor (B57560G1104F) : R0 = 100000 T0 = 25 Beta = 4092
656 ATC Semitec 104GT-2 : R0 = 100000 T0 = 25 Beta = 4267
657 Honeywell 100K Thermistor (135-104LAG-J01) : R0 = 100000 T0 = 25 Beta = 3974
658 
659 */
660 
662 #define GENERIC_THERM1_T0 25
663 
664 #define GENERIC_THERM1_R0 100000
665 
670 #define GENERIC_THERM1_BETA 4036
671 
672 #define GENERIC_THERM1_MIN_TEMP -20
673 
674 #define GENERIC_THERM1_MAX_TEMP 300
675 #define GENERIC_THERM1_R1 0
676 #define GENERIC_THERM1_R2 4700
677 
678 // The same for table 2 and 3 if needed
679 
680 //#define USE_GENERIC_THERMISTORTABLE_2
681 #define GENERIC_THERM2_T0 170
682 #define GENERIC_THERM2_R0 1042.7
683 #define GENERIC_THERM2_BETA 4036
684 #define GENERIC_THERM2_MIN_TEMP -20
685 #define GENERIC_THERM2_MAX_TEMP 300
686 #define GENERIC_THERM2_R1 0
687 #define GENERIC_THERM2_R2 4700
688 
689 //#define USE_GENERIC_THERMISTORTABLE_3
690 #define GENERIC_THERM3_T0 170
691 #define GENERIC_THERM3_R0 1042.7
692 #define GENERIC_THERM3_BETA 4036
693 #define GENERIC_THERM3_MIN_TEMP -20
694 #define GENERIC_THERM3_MAX_TEMP 300
695 #define GENERIC_THERM3_R1 0
696 #define GENERIC_THERM3_R2 4700
697 
699 #define GENERIC_THERM_VREF 5
700 
702 #define GENERIC_THERM_NUM_ENTRIES 33
703 
704 // uncomment the following line for MAX6675 support.
705 //#define SUPPORT_MAX6675
706 // uncomment the following line for MAX31855 support.
707 //#define SUPPORT_MAX31855
708 
709 // ############# Heated bed configuration ########################
710 
712 #define HAVE_HEATED_BED 1
713 
714 #define HEATED_BED_MAX_TEMP 115
715 
716 #define SKIP_M190_IF_WITHIN 3
717 
718 // Select type of your heated bed. It's the same as for EXT0_TEMPSENSOR_TYPE
719 // set to 0 if you don't have a heated bed
720 #define HEATED_BED_SENSOR_TYPE 1
721 
722 #define HEATED_BED_SENSOR_PIN TEMP_1_PIN
723 
724 #define HEATED_BED_HEATER_PIN HEATER_1_PIN
725 // How often the temperature of the heated bed is set (msec)
726 #define HEATED_BED_SET_INTERVAL 5000
727 
735 #define HEATED_BED_HEAT_MANAGER 1
736 
740 #define HEATED_BED_PID_INTEGRAL_DRIVE_MAX 255
741 
748 #define HEATED_BED_PID_INTEGRAL_DRIVE_MIN 80
749 
750 #define HEATED_BED_PID_PGAIN_OR_DEAD_TIME 196
751 
752 #define HEATED_BED_PID_IGAIN 33.02
753 
754 #define HEATED_BED_PID_DGAIN 290
755 // maximum time the heater can be switched on. Max = 255. Overridden if EEPROM activated.
756 #define HEATED_BED_PID_MAX 255
757 // Time to see a temp. change when fully heating. Consider that beds at higher temp. need longer to rise and cold
758 // beds need some time to get the temp. to the sensor. Time is in milliseconds! Set 0 to disable
759 #define HEATED_BED_DECOUPLE_TEST_PERIOD 300000
760 
761 // When temperature exceeds max temp, your heater will be switched off.
762 // This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
763 #define MAXTEMP 260
764 
765 #define HEATED_BED_PREHEAT_TEMP 55
766 
768 #define MIN_DEFECT_TEMPERATURE -10
769 #define MAX_DEFECT_TEMPERATURE 300
770 
771 //How many milliseconds a hot end will preheat before starting to check the
772 //temperature. This value should NOT be set to the time it takes the
773 //hot end to reach the target temperature, but should be set to the time it
774 //takes to reach the minimum temperature your thermistor can read. The lower
775 //the better/safer, and shouldn't need to be more than 30 seconds (30000)
776 #define MILLISECONDS_PREHEAT_TIME 30000
777 
778 // ##########################################################################################
779 // ## Laser configuration ##
780 // ##########################################################################################
781 
782 /*
783 If the firmware is in laser mode, it can control a laser output to cut or engrave materials.
784 Please use this feature only if you know about safety and required protection. Lasers are
785 dangerous and can hurt or make you blind!!!
786 
787 The default laser driver only supports laser on and off. Here you control the intensity with
788 your feedrate. For exchangeable diode lasers this is normally enough. If you need more control
789 you can set the intensity in a range 0-255 with a custom extension to the driver. See driver.h
790 and comments on how to extend the functions non invasive with our event system.
791 
792 If you have a laser - powder system you will like your E override. If moves contain a
793 increasing extruder position it will laser that move. With this trick you can
794 use existing FDM slicers to laser the output. Laser width is extrusion width.
795 
796 Other tools may use M3 and M5 to enable/disable laser. Here G1/G2/G3 moves have laser enabled
797 and G0 moves have it disables.
798 
799 In any case, laser only enables while moving. At the end of a move it gets
800 automatically disabled.
801 */
802 
803 #define SUPPORT_LASER 0 // set 1 to enable laser support
804 #define LASER_PIN -1 // set to pin enabling laser
805 #define LASER_ON_HIGH 1 // Set 0 if low signal enables laser
806 #define LASER_WARMUP_TIME 0// wait x milliseconds to start material burning before move
807 #define LASER_PWM_MAX 255 //255 8-bit PWM 4095 for 12Bit PWM
808 #define LASER_WATT 1.6 // Laser diode power
809 
810 // ##########################################################################################
811 // ## CNC configuration ##
812 // ##########################################################################################
813 
814 /*
815 If the firmware is in CNC mode, it can control a mill with M3/M4/M5. It works
816 similar to laser mode, but mill keeps enabled during G0 moves and it allows
817 setting rpm (only with event extension that supports this) and milling direction.
818 It also can add a delay to wait for spindle to run on full speed.
819 */
820 
821 #define SUPPORT_CNC 0 // Set 1 for CNC support
822 #define CNC_WAIT_ON_ENABLE 300 // wait x milliseconds after enabling
823 #define CNC_WAIT_ON_DISABLE 0 // delay in milliseconds after disabling spindle. May be required for direction changes.
824 #define CNC_ENABLE_PIN -1 // Pin to enable mill
825 #define CNC_ENABLE_WITH 1 // Set 0 if low enables spindle
826 #define CNC_DIRECTION_PIN -1 // Set to pin if direction control is possible
827 #define CNC_DIRECTION_CW 1 // Set signal required for clockwise rotation
828 #define CNC_PWM_MAX 255 //255 8-bit PWM 4095 for 12Bit PWM
829 #define CNC_RPM_MAX 25000 //max spindle RPM
830 #define CNC_SAFE_Z 150 // Safe Z height so tool is outside object, used for pause
831 
832 /* Select the default mode when the printer gets enables. Possible values are
833 PRINTER_MODE_FFF 0
834 PRINTER_MODE_LASER 1
835 PRINTER_MODE_CNC 2
836 */
837 #define DEFAULT_PRINTER_MODE PRINTER_MODE_FFF
838 
839 // ##########################################################################################
840 // ## Endstop configuration ##
841 // ##########################################################################################
842 
843 /* By default all endstops are pulled up to HIGH. You need a pull-up if you
844 use a mechanical endstop connected with GND. Set value to false for no pull-up
845 on this endstop.
846 */
847 #define ENDSTOP_PULLUP_X_MIN false
848 #define ENDSTOP_PULLUP_Y_MIN false
849 #define ENDSTOP_PULLUP_Z_MIN false
850 #define ENDSTOP_PULLUP_X_MAX true
851 #define ENDSTOP_PULLUP_Y_MAX true
852 #define ENDSTOP_PULLUP_Z_MAX false
853 
854 //set to true to invert the logic of the endstops
855 #define ENDSTOP_X_MIN_INVERTING true
856 #define ENDSTOP_Y_MIN_INVERTING true
857 #define ENDSTOP_Z_MIN_INVERTING true
858 #define ENDSTOP_X_MAX_INVERTING false
859 #define ENDSTOP_Y_MAX_INVERTING false
860 #define ENDSTOP_Z_MAX_INVERTING true
861 
862 // Set the values true where you have a hardware endstop. The Pin number is taken from pins.h.
863 
864 #define MIN_HARDWARE_ENDSTOP_X true
865 #define MIN_HARDWARE_ENDSTOP_Y true
866 #define MIN_HARDWARE_ENDSTOP_Z false
867 #define MAX_HARDWARE_ENDSTOP_X false
868 #define MAX_HARDWARE_ENDSTOP_Y false
869 #define MAX_HARDWARE_ENDSTOP_Z true
870 
871 //If your axes are only moving in one direction, make sure the endstops are connected properly.
872 //If your axes move in one direction ONLY when the endstops are triggered, set ENDSTOPS_INVERTING to true here
873 
874 
875 
877 
878 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
879 #define X_ENABLE_ON 0
880 #define Y_ENABLE_ON 0
881 #define Z_ENABLE_ON 0
882 
883 // Disables axis when it's not being used.
884 #define DISABLE_X false
885 #define DISABLE_Y false
886 #define DISABLE_Z false
887 #define DISABLE_E false
888 /* If you want to keep z motor running on stepper timeout, remove comments below.
889  This may be useful if your z bed moves when motors are disabled. Will still
890  turn z off when heaters get also disabled.
891 */
892 //#define PREVENT_Z_DISABLE_ON_STEPPER_TIMEOUT
893 
894 // Inverting motor direction. Only in case of pure cartesian printers, this
895 // is also the axis you invert!
896 #define INVERT_X_DIR true
897 #define INVERT_Y_DIR true
898 #define INVERT_Z_DIR true
899 
901 // Sets direction of endstops when homing; 1=MAX, -1=MIN
902 #define X_HOME_DIR -1
903 #define Y_HOME_DIR -1
904 #define Z_HOME_DIR 1
905 
906 // Delta robot radius endstop
907 #define max_software_endstop_r true
908 
909 //If true, axis won't move to coordinates less than zero.
910 #define min_software_endstop_x false
911 #define min_software_endstop_y false
912 #define min_software_endstop_z false
913 
914 //If true, axis won't move to coordinates greater than the defined lengths below.
915 #define max_software_endstop_x true
916 #define max_software_endstop_y true
917 #define max_software_endstop_z false
918 
919 // If during homing the endstop is reached, ho many mm should the printer move back for the second try
920 #define ENDSTOP_X_BACK_MOVE 5
921 #define ENDSTOP_Y_BACK_MOVE 5
922 #define ENDSTOP_Z_BACK_MOVE 2
923 
924 // For higher precision you can reduce the speed for the second test on the endstop
925 // during homing operation. The homing speed is divided by the value. 1 = same speed, 2 = half speed
926 #define ENDSTOP_X_RETEST_REDUCTION_FACTOR 2
927 #define ENDSTOP_Y_RETEST_REDUCTION_FACTOR 2
928 #define ENDSTOP_Z_RETEST_REDUCTION_FACTOR 2
929 
930 // When you have several endstops in one circuit you need to disable it after homing by moving a
931 // small amount back. This is also the case with H-belt systems.
932 #define ENDSTOP_X_BACK_ON_HOME 1
933 #define ENDSTOP_Y_BACK_ON_HOME 1
934 #define ENDSTOP_Z_BACK_ON_HOME 0
935 // If you do z min homing, you might want to rise extruder a bit after homing so it does not heat
936 // touching your bed.
937 #define Z_UP_AFTER_HOME 0
938 // You can disable endstop checking for print moves. This is needed, if you get sometimes
939 // false signals from your endstops. If your endstops don't give false signals, you
940 // can set it on for safety.
941 #define ALWAYS_CHECK_ENDSTOPS 1
942 
943 // maximum positions in mm - only fixed numbers!
944 // For delta robot Z_MAX_LENGTH is the maximum travel of the towers and should be set to the distance between the hotend
945 // and the platform when the printer is at its home position.
946 // If EEPROM is enabled these values will be overridden with the values in the EEPROM
947 #define X_MAX_LENGTH 165
948 #define Y_MAX_LENGTH 175
949 #define Z_MAX_LENGTH 116.820
950 // Coordinates for the minimum axis. Can also be negative if you want to have the bed start at 0 and the printer can go to the left side
951 // of the bed. Maximum coordinate is given by adding the above X_MAX_LENGTH values.
952 #define X_MIN_POS 0
953 #define Y_MIN_POS 0
954 #define Z_MIN_POS 0
955 
956 // ##########################################################################################
957 // ## Movement settings ##
958 // ##########################################################################################
959 
960 // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. Currently only works for RAMBO boards
961 #define MICROSTEP_MODES {8,8,8,8,8} // [1,2,4,8,16]
962 
963 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
964 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
965 #if MOTHERBOARD==301
966 //#define MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
967 #define MOTOR_CURRENT_PERCENT {53,53,53,53,53}
968 #elif MOTHERBOARD==12
969 //#define MOTOR_CURRENT {35713,35713,35713,35713,35713} // Values 0-65535 (3D Master 35713 = ~1A)
970 #define MOTOR_CURRENT_PERCENT {55,55,55,55,55}
971 #endif
972 
975 #define DELTA_SEGMENTS_PER_SECOND_PRINT 180 // Move accurate setting for print moves
976 #define DELTA_SEGMENTS_PER_SECOND_MOVE 70 // Less accurate setting for other moves
977 
978 // Delta settings
979 #if DRIVE_SYSTEM==DELTA
980 
982 #define DELTA_DIAGONAL_ROD 345 // mm
983 
984 
985 /* =========== Parameter essential for delta calibration ===================
986 
987  C, Y-Axis
988  | |___| CARRIAGE_HORIZONTAL_OFFSET (recommend set it to 0)
989  | | \------------------------------------------
990  |_________ X-axis | \ |
991  / \ | \ DELTA_DIAGONAL_ROD (length) Each move this Rod Height
992  / \ \ is calculated
993  / \ \ Carriage is at printer center! |
994  A B \_____/--------------------------------
995  |--| END_EFFECTOR_HORIZONTAL_OFFSET (recommend set it to 0)
996  |----| ROD_RADIUS (Horizontal rod pivot to pivot measure)
997  |-----------| PRINTER_RADIUS (recommend set it to ROD_RADIUS)
998 
999  Column angles are measured from X-axis counterclockwise
1000  "Standard" positions: alpha_A = 210, alpha_B = 330, alpha_C = 90
1001 */
1002 
1004 #define DELTA_ALPHA_A 210
1005 #define DELTA_ALPHA_B 330
1006 #define DELTA_ALPHA_C 90
1007 
1009 #define DELTA_RADIUS_CORRECTION_A 0
1010 #define DELTA_RADIUS_CORRECTION_B 0
1011 #define DELTA_RADIUS_CORRECTION_C 0
1012 
1014 #define DELTA_DIAGONAL_CORRECTION_A 0
1015 #define DELTA_DIAGONAL_CORRECTION_B 0
1016 #define DELTA_DIAGONAL_CORRECTION_C 0
1017 
1019 #define DELTA_MAX_RADIUS 200
1020 
1021 // Margin (mm) to avoid above tower minimum (xMin xMinsteps)
1022 // If your printer can put its carriage low enough the rod is horizontal without hitting the floor
1023 // set this to zero. Otherwise, measure how high the carriage is from horizontal rod
1024 // Also, movement speeds are 10x to 20x cartesian speeds at tower bottom.
1025 // You may need to leave a few mm for safety.
1026 // Hitting floor at high speed can damage your printer (motors, drives, etc)
1027 // THIS MAY NEED UPDATING IF THE HOT END HEIGHT CHANGES!
1028 #define DELTA_FLOOR_SAFETY_MARGIN_MM 15
1029 
1032 #define END_EFFECTOR_HORIZONTAL_OFFSET 0
1033 
1036 #define CARRIAGE_HORIZONTAL_OFFSET 0
1037 
1042 #define PRINTER_RADIUS 124
1043 
1046 #define EXACT_DELTA_MOVES 1
1047 
1048 /* ========== END Delta calibration data ==============*/
1049 
1053 #define DELTA_HOME_ON_POWER 0
1054 
1057 #define DELTA_X_ENDSTOP_OFFSET_STEPS 0
1058 #define DELTA_Y_ENDSTOP_OFFSET_STEPS 0
1059 #define DELTA_Z_ENDSTOP_OFFSET_STEPS 0
1060 
1061 #endif
1062 #if DRIVE_SYSTEM==TUGA
1063 // ========== Tuga special settings =============
1064 /* Radius of the long arm in mm. */
1065 #define DELTA_DIAGONAL_ROD 240
1066 #endif
1067 
1077 #define DELTASEGMENTS_PER_PRINTLINE 22
1078 
1084 #define STEPPER_INACTIVE_TIME 360
1085 
1091 #define MAX_INACTIVE_TIME 0L
1092 
1096 #define MAX_FEEDRATE_X 200
1097 #define MAX_FEEDRATE_Y 200
1098 #define MAX_FEEDRATE_Z 5
1099 
1101 #define HOMING_FEEDRATE_X 80
1102 #define HOMING_FEEDRATE_Y 80
1103 #define HOMING_FEEDRATE_Z 3
1104 
1111 #define HOMING_ORDER HOME_ORDER_ZXY
1112 /*
1113  Raise Z before homing z axis
1114  0 = no
1115  1 = if z min is triggered
1116  2 = always
1117  This is for printers with z probe used as z min. For homing the probe must be
1118  at a minimum height for some endstop types, so raising it before will help
1119  to make sure this is guaranteed.
1120 */
1121 #define ZHOME_PRE_RAISE 0
1122 // Distance in mm to raise if required
1123 #define ZHOME_PRE_RAISE_DISTANCE 10
1124 
1125 /*
1126  Raises Z before swapping extruder (tool change) and lowers it afterwards
1127  Unit is mm (INTEGER NUMBERS ONLY)
1128  */
1129 #define RAISE_Z_ON_TOOLCHANGE 0
1130 
1131 // Used for homing order HOME_ORDER_ZXYTZ
1132 #define ZHOME_MIN_TEMPERATURE 0
1133 // needs to heat all extruders (1) or only current extruder (0)
1134 #define ZHOME_HEAT_ALL 1
1135 // Z-height for heating extruder during homing
1136 #define ZHOME_HEAT_HEIGHT 20
1137 // If your bed might bend while probing, because your sensor is the extruder tip
1138 // you can define a predefined x,y position so bending is always the same and
1139 // can be compensated. Set coordinate to 999999 to ignore positions and just
1140 // use the position you are at.
1141 #define ZHOME_X_POS IGNORE_COORDINATE
1142 #define ZHOME_Y_POS IGNORE_COORDINATE
1143 
1144 /* If you have a backlash in both z-directions, you can use this. For most printer, the bed will be pushed down by it's
1145 own weight, so this is nearly never needed. */
1146 #define ENABLE_BACKLASH_COMPENSATION 0
1147 #define Z_BACKLASH 0
1148 #define X_BACKLASH 0
1149 #define Y_BACKLASH 0
1150 
1152 #define RAMP_ACCELERATION 1
1153 
1159 #define STEPPER_HIGH_DELAY 0
1160 
1166 #define DIRECTION_DELAY 0
1167 
1173 #define STEP_DOUBLER_FREQUENCY 12000
1174 
1177 #define ALLOW_QUADSTEPPING 1
1178 
1182 #define DOUBLE_STEP_DELAY 0 // time in microseconds
1183 
1188 #define KEEP_ALIVE_INTERVAL 2000
1189 
1194 #define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_X 1000
1195 #define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_Y 1000
1196 #define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_Z 100
1197 
1199 #define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_X 2000
1200 #define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_Y 2000
1201 #define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_Z 100
1202 
1213 #define INTERPOLATE_ACCELERATION_WITH_Z 0
1214 #define ACCELERATION_FACTOR_TOP 100
1215 
1239 #define MAX_JERK 20.0
1240 #define MAX_ZJERK 0.3
1241 
1247 #define PRINTLINE_CACHE_SIZE 16
1248 
1255 #define MOVE_CACHE_LOW 10
1256 
1261 #define LOW_TICKS_PER_MOVE 250000
1262 
1263 // ##########################################################################################
1264 // ## Extruder control ##
1265 // ##########################################################################################
1266 
1267 
1268 /* \brief Minimum temperature for extruder operation
1269 
1270 This is a safety value. If your extruder temperature is below this temperature, no
1271 extruder steps are executed. This is to prevent your extruder to move unless the filament
1272 is at least molten. After having some complains that the extruder does not work, I leave
1273 it 0 as default.
1274 */
1275 
1276 #define MIN_EXTRUDER_TEMP 160
1277 
1284 #define USE_ADVANCE 1
1285 
1290 #define ENABLE_QUADRATIC_ADVANCE 0
1291 
1292 
1293 // ##########################################################################################
1294 // ## Communication configuration ##
1295 // ##########################################################################################
1296 
1298 
1309 //#define BAUDRATE 76800
1310 #define BAUDRATE 115200
1311 //#define BAUDRATE 250000
1312 
1317 #define ENABLE_POWER_ON_STARTUP 1
1318 
1323 #define POWER_INVERTING 0
1324 
1328 #define KILL_METHOD 1
1329 
1331 #define ACK_WITH_LINENUMBER 1
1332 
1335 #define WAITING_IDENTIFIER "wait"
1336 
1346 #define ECHO_ON_EXECUTE 1
1347 
1359 #define EEPROM_MODE 2
1360 
1361 
1362 /**************** duplicate motor driver ***************
1363 
1364 If you have unused extruder steppers free, you could use it to drive the second or third z motor
1365 instead of driving them with a single stepper. The same works for the other axis if needed.
1366 */
1367 
1368 #define FEATURE_TWO_XSTEPPER 0
1369 #define X2_STEP_PIN E1_STEP_PIN
1370 #define X2_DIR_PIN E1_DIR_PIN
1371 #define X2_ENABLE_PIN E1_ENABLE_PIN
1372 
1373 /* Dual x axis mean having a printer with x motors and each controls one
1374 extruder position. In that case you can also have different resolutions for the
1375 2 motors. */
1376 #define DUAL_X_AXIS 0
1377 #define DUAL_X_RESOLUTION 0
1378 #define X2AXIS_STEPS_PER_MM 100
1379 
1380 
1381 #define FEATURE_TWO_YSTEPPER 0
1382 #define Y2_STEP_PIN E1_STEP_PIN
1383 #define Y2_DIR_PIN E1_DIR_PIN
1384 #define Y2_ENABLE_PIN E1_ENABLE_PIN
1385 
1386 #define FEATURE_TWO_ZSTEPPER 0
1387 #define Z2_STEP_PIN E1_STEP_PIN
1388 #define Z2_DIR_PIN E1_DIR_PIN
1389 #define Z2_ENABLE_PIN E1_ENABLE_PIN
1390 
1391 #define FEATURE_THREE_ZSTEPPER 0
1392 #define Z3_STEP_PIN E2_STEP_PIN
1393 #define Z3_DIR_PIN E2_DIR_PIN
1394 #define Z3_ENABLE_PIN E2_ENABLE_PIN
1395 
1396 #define FEATURE_FOUR_ZSTEPPER 0
1397 #define Z4_STEP_PIN E2_STEP_PIN
1398 #define Z4_DIR_PIN E2_DIR_PIN
1399 #define Z4_ENABLE_PIN E2_ENABLE_PIN
1400 
1401 /* Ditto printing allows 2 extruders to do the same action. This effectively allows
1402 to print an object two times at the speed of one. Works only with dual extruder setup.
1403 */
1404 #define FEATURE_DITTO_PRINTING 0
1405 
1406 /* Servos
1407 
1408 If you need to control servos, enable this feature. You can control up to 4 servos.
1409 Control the servos with
1410 M340 P<servoId> S<pulseInUS>
1411 servoID = 0..3
1412 Servos are controlled by a pulse width normally between 500 and 2500 with 1500ms in center position. 0 turns servo off.
1413 
1414 WARNING: Servos can draw a considerable amount of current. Make sure your system can handle this or you may risk your hardware!
1415 */
1416 
1417 #define FEATURE_SERVO 0
1418 // Servo pins on a RAMPS board are 11,6,5,4
1419 #define SERVO0_PIN 11
1420 #define SERVO1_PIN 6
1421 #define SERVO2_PIN 5
1422 #define SERVO3_PIN 4
1423 /* for set servo(s) at designed neutral position at power-up. Values < 500 mean no start position */
1424 #define SERVO0_NEUTRAL_POS -1
1425 #define SERVO1_NEUTRAL_POS -1
1426 #define SERVO2_NEUTRAL_POS -1
1427 #define SERVO3_NEUTRAL_POS -1
1428 
1429 #define UI_SERVO_CONTROL 0
1430 
1433 #define FAN_KICKSTART_TIME 200
1434 
1435 /* A watchdog resets the printer, if a signal is not send within predefined time limits. That way we can be sure that the board
1436 is always running and is not hung up for some unknown reason. */
1437 #define FEATURE_WATCHDOG 1
1438 
1439 /* Z-Probing */
1440 
1441 /* After homing the z position is corrected to compensate
1442 for a bed coating. Since you can change coatings the value is stored in
1443 EEPROM if enabled, so you can switch between different coatings without needing
1444 to recalibrate z.
1445 */
1446 #define Z_PROBE_Z_OFFSET 0 // offset to coating form real bed level
1447 /* How is z min measured
1448  0 = trigger is height of real bed neglecting coating
1449  1 = trigger is current coating
1450 
1451  For mode 1 the current coating thickness is added to measured z probe distances.
1452  That way the real bed is always the reference height. For inductive sensors
1453  or z min endstops the coating has no effect on the result, so you should use mode 0.
1454 */
1455 #define Z_PROBE_Z_OFFSET_MODE 0
1456 
1457 #define FEATURE_Z_PROBE 1
1458 // Especially if you have more then 1 extruder acting as z probe this is important!
1459 #define EXTRUDER_IS_Z_PROBE 0
1460 // Disable all heaters before probing - required for inductive sensors
1461 #define Z_PROBE_DISABLE_HEATERS 0
1462 #define Z_PROBE_PIN 63
1463 #define Z_PROBE_PULLUP 1
1464 #define Z_PROBE_ON_HIGH 1
1465 #define Z_PROBE_X_OFFSET 0
1466 #define Z_PROBE_Y_OFFSET 0
1467 #define Z_PROBE_BED_DISTANCE 5.0 // Higher than max bed level distance error in mm
1468 
1469 // Waits for a signal to start. Valid signals are probe hit and ok button.
1470 // This is needful if you have the probe trigger by hand.
1471 #define Z_PROBE_WAIT_BEFORE_TEST 0
1472 
1473 #define Z_PROBE_SPEED 2
1474 
1475 #define Z_PROBE_DELAY 0
1476 #define Z_PROBE_XY_SPEED 150
1477 #define Z_PROBE_SWITCHING_DISTANCE 1.5 // Distance to safely switch off probe after it was activated
1478 #define Z_PROBE_REPETITIONS 5 // Repetitions for probing at one point.
1479 
1480 #define Z_PROBE_HEIGHT 39.91
1481 
1482 #define Z_PROBE_START_SCRIPT ""
1483 #define Z_PROBE_FINISHED_SCRIPT ""
1484 
1485 #define Z_PROBE_REQUIRES_HEATING 0
1486 
1487 #define Z_PROBE_MIN_TEMPERATURE 150
1488 
1489 /*
1490 Define how we measure the bed rotation.
1491 All methods need at least 3 points to define the bed rotation correctly. The quality we get comes
1492 from the selection of the right points and method.
1493 
1494 BED_LEVELING_METHOD 0
1495 This method measures at the 3 probe points and creates a plane through these points. If you have
1496 a really planar bed this gives the optimum result. The 3 points must not be in one line and have
1497 a long distance to increase numerical stability.
1498 
1499 BED_LEVELING_METHOD 1
1500 This measures a grid. Probe point 1 is the origin and points 2 and 3 span a grid. We measure
1501 BED_LEVELING_GRID_SIZE points in each direction and compute a regression plane through all
1502 points. This gives a good overall plane if you have small bumps measuring inaccuracies.
1503 
1504 BED_LEVELING_METHOD 2
1505 Bending correcting 4 point measurement. This is for cantilevered beds that have the rotation axis
1506 not at the side but inside the bed. Here we can assume no bending on the axis and a symmetric
1507 bending to both sides of the axis. So probe points 2 and 3 build the symmetric axis and
1508 point 1 is mirrored to 1m across the axis. Using the symmetry we then remove the bending
1509 from 1 and use that as plane.
1510 */
1511 #define BED_LEVELING_METHOD 0
1512 /* How to correct rotation.
1513 0 = software side
1514 1 = motorized modification of 2 from 3 fixture points.
1515 */
1516 #define BED_CORRECTION_METHOD 0
1517 // Grid size for grid based plane measurement
1518 #define BED_LEVELING_GRID_SIZE 4
1519 // Repetitions for motorized bed leveling
1520 #define BED_LEVELING_REPETITIONS 5
1521 /* These are the motor positions relative to bed origin. Only needed for
1522 motorized bed leveling */
1523 #define BED_MOTOR_1_X 0
1524 #define BED_MOTOR_1_Y 0
1525 #define BED_MOTOR_2_X 200
1526 #define BED_MOTOR_2_Y 0
1527 #define BED_MOTOR_3_X 100
1528 #define BED_MOTOR_3_Y 200
1529 
1530 /* Autoleveling allows it to z-probe 3 points to compute the inclination and compensates the error for the print.
1531  This feature requires a working z-probe and you should have z-endstop at the top not at the bottom.
1532  The same 3 points are used for the G29 command.
1533 */
1534 #define FEATURE_AUTOLEVEL 0
1535 #define Z_PROBE_X1 100
1536 #define Z_PROBE_Y1 20
1537 #define Z_PROBE_X2 160
1538 #define Z_PROBE_Y2 170
1539 #define Z_PROBE_X3 20
1540 #define Z_PROBE_Y3 170
1541 /* Bending correction adds a value to a measured z-probe value. This may be
1542  required when the z probe needs some force to trigger and this bends the
1543  bed down. Currently the correction values A/B/C correspond to z probe
1544  positions 1/2/3. In later versions a bending correction algorithm might be
1545  introduced to give it other meanings.*/
1546 #define BENDING_CORRECTION_A 0
1547 #define BENDING_CORRECTION_B 0
1548 #define BENDING_CORRECTION_C 0
1549 
1550 /* DISTORTION_CORRECTION compensates the distortion caused by mechanical imprecisions of nonlinear (i.e. DELTA) printers
1551  * assumes that the floor is plain (i.e. glass plate)
1552  * and that it is perpendicular to the towers
1553  * and that the (0,0) is in center
1554  * requires z-probe
1555  * G29 measures the Z offset in matrix NxN points (due to nature of the delta printer, the corners are extrapolated instead of measured)
1556  * and compensate the distortion
1557  * more points means better compensation, but consumes more memory and takes more time
1558  * DISTORTION_CORRECTION_R is the distance of last row or column from center
1559  */
1560 
1561 #define DISTORTION_CORRECTION 1
1562 #define DISTORTION_CORRECTION_POINTS 5
1563 
1564 #define DISTORTION_LIMIT_TO 2
1565 /* For delta printers you simply define the measured radius around origin */
1566 #define DISTORTION_CORRECTION_R 80
1567 /* For all others you define the correction rectangle by setting the min/max coordinates. Make sure the the probe can reach all points! */
1568 #define DISTORTION_XMIN 10
1569 #define DISTORTION_YMIN 10
1570 #define DISTORTION_XMAX 190
1571 #define DISTORTION_YMAX 190
1572 
1577 #define DISTORTION_PERMANENT 1
1578 
1587 #define DISTORTION_UPDATE_FREQUENCY 15
1588 
1590 #define DISTORTION_START_DEGRADE 0.5
1591 
1592 #define DISTORTION_END_HEIGHT 1.5
1593 
1595 #define DISTORTION_EXTRAPOLATE_CORNERS 0
1596 
1597 /* If your printer is not exactly square but is more like a parallelogram, you can
1598 use this to compensate the effect of printing squares like parallelograms. Set the
1599 parameter to then tangents of the deviation from 90° when you print a square object.
1600 E.g. if you angle is 91° enter tan(1) = 0.017. If error doubles you have the wrong sign.
1601 Always hard to say since the other angle is 89° in this case!
1602 */
1603 #define FEATURE_AXISCOMP 0
1604 #define AXISCOMP_TANXY 0
1605 #define AXISCOMP_TANYZ 0
1606 #define AXISCOMP_TANXZ 0
1607 
1608 
1609 
1613 #define FEATURE_SOFTWARE_LEVELING 0
1614 
1615 /* Babystepping allows to change z height during print without changing official z height */
1616 #define FEATURE_BABYSTEPPING 0
1617 /* If you have a threaded rod, you want a higher multiplicator to see an effect. Limit value to 50 or you get easily overflows.*/
1618 #define BABYSTEP_MULTIPLICATOR 1
1619 
1620 /* Define a pin to turn light on/off */
1621 #define CASE_LIGHTS_PIN -1
1622 #define CASE_LIGHT_DEFAULT_ON 1
1623 
1625 #ifndef SDSUPPORT // Some boards have SD support on board. These define the values already in pins.h
1626 #define SDSUPPORT false
1627 // Uncomment to enable or change card detection pin. With card detection the card is mounted on insertion.
1628 #undef SDCARDDETECT
1629 #define SDCARDDETECT -1
1630 // Change to true if you get a inserted message on removal.
1631 #define SDCARDDETECTINVERTED false
1632 #endif
1633 
1634 #define SD_EXTENDED_DIR 1
1635 
1637 #define SD_RUN_ON_STOP ""
1638 
1639 #define SD_STOP_HEATER_AND_MOTORS_ON_STOP 1
1640 
1641 // If you want support for G2/G3 arc commands set to true, otherwise false.
1642 #define ARC_SUPPORT 1
1643 
1646 #define FEATURE_MEMORY_POSITION 1
1647 
1649 #define FEATURE_CHECKSUM_FORCED 0
1650 
1654 #define FEATURE_FAN_CONTROL 1
1655 
1656 /* You can have a second fan controlled by adding P1 to M106/M107 command. */
1657 #define FEATURE_FAN2_CONTROL 0
1658 //#define FAN2_PIN ORIG_FAN2_PIN
1659 
1660 /* By setting FAN_BOARD_PIN to a pin number you get a board cooler. That fan
1661 goes on as soon as moves occur. Mainly to prevent overheating of stepper drivers. */
1662 //#undef FAN_BOARD_PIN
1663 //#define FAN_BOARD_PIN ORIG_FAN_PIN
1665 #define BOARD_FAN_SPEED 255
1666 /* Speed when no cooling is required. Normally 0 but if you need slightly cooling
1667 it can be set here */
1668 #define BOARD_FAN_MIN_SPEED 0
1669 /* You can have one additional fan controlled by a temperature. You can set
1670  set at which temperature it should turn on and at which it should reach max. speed.
1671 */
1672 #define FAN_THERMO_PIN -1
1673 #define FAN_THERMO_MIN_PWM 128
1674 #define FAN_THERMO_MAX_PWM 255
1675 #define FAN_THERMO_MIN_TEMP 45
1676 #define FAN_THERMO_MAX_TEMP 60
1677 // Analog pin number or channel for due boards
1678 #define FAN_THERMO_THERMISTOR_PIN -1
1679 #define FAN_THERMO_THERMISTOR_TYPE 1
1680 
1687 #define DOOR_PIN -1
1688 #define DOOR_PULLUP 1
1689 #define DOOR_INVERTING 1
1690 
1695 #define FEATURE_JSON 0
1696 
1731 #define FEATURE_CONTROLLER NO_CONTROLLER
1732 
1733 /* You can have one keypad connected via single analog pin as seen on
1734  some printers with Melzi V2.0 board, 20x4 LCD and 5 buttons keypad. This must be
1735  the analog pin number! */
1736 #define ADC_KEYPAD_PIN -1
1737 
1745 #define LANGUAGE_EN_ACTIVE 1 // English
1746 #define LANGUAGE_DE_ACTIVE 1 // German
1747 #define LANGUAGE_NL_ACTIVE 0 // Dutch
1748 #define LANGUAGE_PT_ACTIVE 1 // Brazilian Portuguese
1749 #define LANGUAGE_IT_ACTIVE 1 // Italian
1750 #define LANGUAGE_ES_ACTIVE 1 // Spanish
1751 #define LANGUAGE_FI_ACTIVE 0 // Finnish
1752 #define LANGUAGE_SE_ACTIVE 0 // Swedish
1753 #define LANGUAGE_FR_ACTIVE 1 // French
1754 #define LANGUAGE_CZ_ACTIVE 0 // Czech
1755 #define LANGUAGE_PL_ACTIVE 1 // Polish
1756 #define LANGUAGE_TR_ACTIVE 1 // Turkish
1757 
1758 /* Some displays loose their settings from time to time. Try uncommenting the
1759 auto-repair function if this is the case. It is not supported for all display
1760 types. It creates a minimal flicker from time to time and also slows down
1761 computations, so do not enable it if your display works stable!
1762 */
1763 //#define TRY_AUTOREPAIR_LCD_ERRORS
1764 
1765 // This is line 2 of the status display at startup. Change to your like.
1766 #define UI_PRINTER_NAME "MyPrinter"
1767 #define UI_PRINTER_COMPANY "Self Made"
1768 
1769 
1772 //#define UI_HEAD "E1:%e0/%E0 E2:%e1/%E1 B:%eb/%Eb"
1773 
1775 #define UI_PAGES_DURATION 4000
1776 
1778 #define UI_START_SCREEN_DELAY 1000
1779 
1781 #define UI_DISABLE_AUTO_PAGESWITCH 1
1782 
1784 #define UI_AUTORETURN_TO_MENU_AFTER 30000
1785 
1786 #define FEATURE_UI_KEYS 0
1787 
1788 /* Normally cou want a next/previous actions with every click of your encoder.
1789 Unfortunately, the encoder have a different count of phase changes between clicks.
1790 Select an encoder speed from 0 = fastest to 2 = slowest that results in one menu move per click.
1791 */
1792 #define UI_ENCODER_SPEED 1
1793 
1794 // Set to 1 to reverse encoder direction
1795 #define UI_REVERSE_ENCODER 0
1796 
1797 /* There are 2 ways to change positions. You can move by increments of 1/0.1 mm resulting in more menu entries
1798 and requiring many turns on your encode. The alternative is to enable speed dependent positioning. It will change
1799 the move distance depending on the speed you turn the encoder. That way you can move very fast and very slow in the
1800 same setting.
1801 
1802 */
1803 #define UI_SPEEDDEPENDENT_POSITIONING 1
1804 
1806 #define UI_DYNAMIC_ENCODER_SPEED 1 // enable dynamic rotary encoder speed
1807 
1808 
1810 #define UI_KEY_BOUNCETIME 10
1811 
1813 #define UI_KEY_FIRST_REPEAT 500
1814 
1815 #define UI_KEY_REDUCE_REPEAT 50
1816 
1817 #define UI_KEY_MIN_REPEAT 50
1818 
1819 #define FEATURE_BEEPER 1
1820 
1826 #define BEEPER_SHORT_SEQUENCE 2,2
1827 #define BEEPER_LONG_SEQUENCE 8,8
1828 
1829 // ###############################################################################
1830 // ## Values for menu settings ##
1831 // ###############################################################################
1832 
1833 /*
1834 If you have leveling with bed coating or fixed z min you can use this menu to adjust
1835 0 height with a simple bed coating menu which adds coating thickness.
1836 */
1837 #define UI_BED_COATING 0
1838 // Extreme values
1839 #define UI_SET_MIN_HEATED_BED_TEMP 50
1840 #define UI_SET_MAX_HEATED_BED_TEMP 120
1841 #define UI_SET_MIN_EXTRUDER_TEMP 160
1842 #define UI_SET_MAX_EXTRUDER_TEMP 270
1843 #define UI_SET_EXTRUDER_FEEDRATE 2 // mm/sec
1844 #define UI_SET_EXTRUDER_RETRACT_DISTANCE 3 // mm
1845 
1846 
1847 /*
1848 #define USER_KEY1_PIN UI_DISPLAY_D5_PIN // D5 to display (not used for graphics controller), change to other pin if you use character LCD !
1849 #define USER_KEY1_ACTION UI_ACTION_FAN_SUSPEND
1850 #define USER_KEY2_PIN UI_DISPLAY_D6_PIN // D6 to display (not used for graphics controller)...
1851 #define USER_KEY2_ACTION UI_ACTION_SD_PRI_PAU_CONT
1852 #define USER_KEY3_PIN UI_DISPLAY_D7_PIN // D7 to display (not used for graphics controller)...
1853 #define USER_KEY3_ACTION UI_ACTION_LIGHTS_ONOFF
1854 #define USER_KEY4_PIN -1
1855 #define USER_KEY4_ACTION UI_ACTION_DUMMY
1856 */
1857 
1858 
1859 // ####### Advanced stuff for very special function #########
1860 
1861 #define NUM_MOTOR_DRIVERS 0
1862 // #define MOTOR_DRIVER_x StepperDriver<int stepPin, int dirPin, int enablePin,bool invertDir, bool invertEnable>(float stepsPerMM,float speed)
1863 // #define MOTOR_DRIVER_x StepperDriverWithEndstop<int stepPin, int dirPin, int enablePin,bool invertDir, bool invertEnable,int endstop_pin,bool minEndstop,minEndstop, bool endstopPullup> var(300,10,50)
1864 #define MOTOR_DRIVER_1(var) StepperDriver<E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, false, false> var(float stepsPerMM,float speed,float maxXPos)
1865 
1866 /*
1867  You can expand firmware functionality with events and you own event handler.
1868  Read Events.h for more informations. To activate, uncomment the following define.
1869 */
1870 //#define CUSTOM_EVENTS
1871 
1872 #endif
1873